package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter
@Setter
//订单表
public class Order extends BaseDomain {
    //用户id
    private Long userId;
    //订单量
    private Integer orderNum;
    //商品
    private Product product;
    //订单状态
    private Integer type;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    public static final Integer TYPE_NOT_PAID = 1;    //未支付
    public static final Integer TYPE_SUC = 2;         //已完成

}